package com.rainy.cloud.core.configuration;

import com.rainy.cloud.core.exception.handler.GlobalExceptionHandler;
import com.rainy.cloud.entity.ResultVo;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

@Configuration
@ControllerAdvice
public class ExceptionConfiguration extends GlobalExceptionHandler {

    @ResponseBody
    @ExceptionHandler(RuntimeException.class)
    public ResultVo<Object> exceptionHandler(Exception exception) {
        return super.exceptionHandler(exception);
    }

}
